<?php

/**
 * DominioToken form base class.
 *
 * @method DominioToken getObject() Returns the current form's model object
 *
 * @package    practil
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseDominioTokenForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'table'       => new sfWidgetFormInputText(),
      'token'       => new sfWidgetFormTextarea(),
      'usuario_id'  => new sfWidgetFormInputHidden(),
      'create_at'   => new sfWidgetFormDateTime(),
      'expirate_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'table'       => new sfValidatorString(array('max_length' => 150)),
      'token'       => new sfValidatorString(),
      'usuario_id'  => new sfValidatorPropelChoice(array('model' => 'Usuario', 'column' => 'id', 'required' => false)),
      'create_at'   => new sfValidatorDateTime(),
      'expirate_at' => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('dominio_token[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DominioToken';
  }


}
